Repository navigation
fix(connection): send an explicit empty --description - #509
Open
pcbeingused33 wants to merge 1 commit into
Open
pcbeingused33 wants to merge 1 commit into
pcbeingused33 wants to merge 1 commit into
Conversation
connection upsert and connection update dropped --description "" from the request, so the stored description was kept while the command reported success. Send the field whenever the flag was given. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gateway connection upsert my-conn --description ""reports success but keeps the stored description.gateway connection update <id> --description ""sends no update at all and just prints the current connection.Cause: both commands only set
descriptionon the request when the value is non-empty, so an explicit empty value is indistinguishable from an omitted flag.Fix: send the field whenever
--descriptionwas given, following the same idea as the--rules '[]'handling from #472. The connection PUT endpoints accept an empty string, and--descriptionis not one of the flags that reject empty values. Omitting the flag still leaves the stored description untouched.This only covers connections; the source and destination commands are not changed here.
Tests: new tests in
pkg/cmd/connection_description_test.gocapture the PUT body forupsert(empty value sent, omitted flag not sent) andupdate(empty value sent). The empty-value cases fail onmainand pass with the change.go vet ./pkg/cmd/andgo test ./pkg/cmd/pass. The tests use a stub API; this was not run against the live service.AI assistance (Claude Code) was used to prepare this change.